package com.phoenix;

import com.fasterxml.jackson.databind.JsonNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.oauth2.client.OAuth2RestOperations;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * Created by lilongfei on 16/6/8.
 */
@RestController
public class TestController {

    @Autowired
    private OAuth2RestOperations restTemplate;

    @RequestMapping("/")
    public JsonNode test(){
        return restTemplate.getForObject("http://localhost:8081/test/hello",JsonNode.class);
    }
}
